Skip to content

fix(windows): carry the requested URL on creation failures - #15

Merged
Y-PLONI merged 3 commits into
Otzaria:masterfrom
palmoni5:fix/windows-creation-failure-url
Aug 28, 2026
Merged

fix(windows): carry the requested URL on creation failures#15
Y-PLONI merged 3 commits into
Otzaria:masterfrom
palmoni5:fix/windows-creation-failure-url

Conversation

@palmoni5

Copy link
Copy Markdown
Member

Follow-up to #14, which merged before this commit landed on its branch.

Problem

WindowsWebViewCreationFailures.stream is global and the event carries no identifier. A host that creates several webviews concurrently — in Otzaria a background plugin host plus one or more plugin tabs, all starting at launch — cannot tell whose creation failed. One instance failing therefore surfaces the error on an unrelated pending webview, and tears down one whose own creation might still have succeeded.

Change

WindowsWebViewCreationFailure now carries requestedUrl, read back from the creation params (initialUrlRequest.url, falling back to initialFile). It is the only identifier both sides hold before the webview exists, so it is what lets a host match a failure to its own request. Hosts that ignore the field are unaffected — the parameter is optional and defaults to null.

Verification

flutter test in flutter_inappwebview_windows: 53 passed, including a new case asserting the URL reaches listeners.

Consumer side: Otzaria/otzaria#1018 filters on this field; its CI is red until this merges.

The failure stream is global, so a host with several webviews being created at once could not tell whose creation failed and would surface the error on an unrelated one. The requested URL is the only identifier both sides hold before the webview exists, so it is now reported alongside the error.
@Y-PLONI
Y-PLONI merged commit 65c68e9 into Otzaria:master Aug 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants